package dao

// 这是 SmsHomeBrand 的全局公开dao对象，被service层调用!
var SmsHomeBrandDao = smsHomeBrandDao{}

// 这是 sms_home_brand表 的实体类
type SmsHomeBrand struct {
	Id              int64  `json:"id" form:"id"` // 编号
	BrandId         int64  `json:"brand_id" form:"brand_id"`
	BrandName       string `json:"brand_name" form:"brand_name"`
	RecommendStatus int32  `json:"recommend_status" form:"recommend_status"`
	Sort            int32  `json:"sort" form:"sort"`
}

// 注意:这是 SmsHomeBrand 的私有dao对象，只能在dao层内使用!
type smsHomeBrandDao struct {
	InsertTemplate        func(arg []SmsHomeBrand) (int64, error)
	Delete                func(ids []int64) (int64, error)                        `args:"ids"`
	UpdateSort            func(id int64, sort int32) (int64, error)               `args:"id,sort"`
	UpdateRecommendStatus func(ids []int64, recommendStatus int32) (int64, error) `args:"ids,recommend_status"`
	List                  func(arg SmsHomeBrandList) ([]SmsHomeBrand, error)
}

type SmsHomeBrandList struct {
	BrandName       string `json:"brand_name" form:"brand_name"`
	RecommendStatus int32  `json:"recommend_status" form:"recommend_status"`
	PageNum         int    `json:"page_num" form:"page_num"`
	PageSize        int    `json:"page_size" form:"page_size"`
}

type SmsHomeBrandReq struct {
	List []SmsHomeBrand `json:"list"`
}
